# 配置文件
import os

# API密钥配置

# 星河大模型 API 配置
XINGHE_API_KEY = os.getenv('XINGHE_API_KEY', 'your-xinghe-api-key-here')
XINGHE_BASE_URL = "https://aistudio.baidu.com/llm/lmapi/v3"

# 模型配置
OPENAI_MODEL = "gpt-3.5-turbo"
DEEPSEEK_MODEL = "deepseek-chat"
XINGHE_MODEL = "ernie-4.5-turbo-vl"  # 星河大模型名称

# 应用配置
FLASK_SECRET_KEY = os.getenv('FLASK_SECRET_KEY', 'your-secret-key-here')
DEBUG_MODE = True

# 默认用户配置
DEFAULT_USERS = {
    'admin': {'password': '123456', 'role': 'admin', 'name': '管理员'},
    'student': {'password': '123456', 'role': 'student', 'name': '学生'},
    'teacher': {'password': '123456', 'role': 'teacher', 'name': '教师'}
}

# 知识库配置
KNOWLEDGE_BASE_PATH = 'rust_knowledge_base/rust_docs_sample.json'

# 问题分类标签
QUESTION_LABELS = ["greeting", "definition", "usage", "error_debug", "comparison", "faq"]


# 环境变量配置
if os.getenv('XINGHE_API_KEY'):
    XINGHE_API_KEY = os.getenv('XINGHE_API_KEY')
    
if os.getenv('OPENAI_API_KEY'):
    OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
else:
    OPENAI_API_KEY = 'your-openai-api-key-here'
    
if os.getenv('DEEPSEEK_API_KEY'):
    DEEPSEEK_API_KEY = os.getenv('DEEPSEEK_API_KEY')
else:
    DEEPSEEK_API_KEY = 'your-deepseek-api-key-here' 